{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "from fastai.vision import *\n",
    "import torch\n",
    "from models.resnet_cifar import *\n",
    "torch.cuda.set_device(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = untar_data(URLs.CIFAR_100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "tfms = get_transforms(do_flip=False)\n",
    "data = ImageDataBunch.from_folder(path, train = 'train', valid = 'test', bs = 64, size = 32, ds_tfms = tfms).normalize(cifar_stats)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = resnet26_cifar(num_classes=100).cuda()\n",
    "learn = Learner(data, model, loss_func=nn.CrossEntropyLoss(), metrics=accuracy)\n",
    "apply_init(learn.model, nn.init.kaiming_normal_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "LR Finder is complete, type {learner_name}.recorder.plot() to see the graph.\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3dd3xV9f3H8dcnC0ImI+y9EWSGJYqi1oFWtAUVUcCFuKp2aFt/trbW1mrdikoRahXUujcKrYhsE/YS2YSVsHdCku/vj3vVGEMIJCcn99738/G4j9x7zrn3vO/lhnfONuccIiIS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EOBWBiEiEUxGIiES4/wfpTfQR1jTb8QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "learn.lr_find()\n",
    "learn.recorder.plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "        <style>\n",
       "            /* Turns off some styling */\n",
       "            progress {\n",
       "                /* gets rid of default border in Firefox and Opera. */\n",
       "                border: none;\n",
       "                /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
       "                background-size: auto;\n",
       "            }\n",
       "            .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
       "                background: #F44336;\n",
       "            }\n",
       "        </style>\n",
       "      <progress value='98' class='' max='100', style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      98.00% [98/100 52:21<01:04]\n",
       "    </div>\n",
       "    \n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: left;\">\n",
       "      <th>epoch</th>\n",
       "      <th>train_loss</th>\n",
       "      <th>valid_loss</th>\n",
       "      <th>accuracy</th>\n",
       "      <th>time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>4.519319</td>\n",
       "      <td>4.505364</td>\n",
       "      <td>0.030100</td>\n",
       "      <td>00:29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>4.228377</td>\n",
       "      <td>4.205509</td>\n",
       "      <td>0.069500</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>4.007363</td>\n",
       "      <td>3.965616</td>\n",
       "      <td>0.108000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>3.800716</td>\n",
       "      <td>3.811036</td>\n",
       "      <td>0.130800</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>3.663030</td>\n",
       "      <td>3.668359</td>\n",
       "      <td>0.151200</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5</td>\n",
       "      <td>3.516231</td>\n",
       "      <td>3.506345</td>\n",
       "      <td>0.178300</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6</td>\n",
       "      <td>3.349746</td>\n",
       "      <td>3.344771</td>\n",
       "      <td>0.202900</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>7</td>\n",
       "      <td>3.240151</td>\n",
       "      <td>3.228859</td>\n",
       "      <td>0.218900</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8</td>\n",
       "      <td>3.120042</td>\n",
       "      <td>3.244804</td>\n",
       "      <td>0.221900</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9</td>\n",
       "      <td>2.950308</td>\n",
       "      <td>3.017282</td>\n",
       "      <td>0.259400</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>10</td>\n",
       "      <td>2.857696</td>\n",
       "      <td>2.869903</td>\n",
       "      <td>0.289500</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>11</td>\n",
       "      <td>2.762388</td>\n",
       "      <td>2.708954</td>\n",
       "      <td>0.308000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>12</td>\n",
       "      <td>2.628205</td>\n",
       "      <td>2.629872</td>\n",
       "      <td>0.320000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>13</td>\n",
       "      <td>2.527343</td>\n",
       "      <td>2.637506</td>\n",
       "      <td>0.323800</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>14</td>\n",
       "      <td>2.432735</td>\n",
       "      <td>2.507645</td>\n",
       "      <td>0.355600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>15</td>\n",
       "      <td>2.375033</td>\n",
       "      <td>2.371682</td>\n",
       "      <td>0.381300</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>16</td>\n",
       "      <td>2.269836</td>\n",
       "      <td>2.350216</td>\n",
       "      <td>0.384200</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>17</td>\n",
       "      <td>2.200811</td>\n",
       "      <td>2.211395</td>\n",
       "      <td>0.409500</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>18</td>\n",
       "      <td>2.077182</td>\n",
       "      <td>2.171935</td>\n",
       "      <td>0.415600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>19</td>\n",
       "      <td>2.037310</td>\n",
       "      <td>2.168930</td>\n",
       "      <td>0.422600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>20</td>\n",
       "      <td>1.991732</td>\n",
       "      <td>2.179814</td>\n",
       "      <td>0.425600</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>21</td>\n",
       "      <td>1.911608</td>\n",
       "      <td>2.195723</td>\n",
       "      <td>0.430900</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>22</td>\n",
       "      <td>1.845948</td>\n",
       "      <td>2.171738</td>\n",
       "      <td>0.433100</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>23</td>\n",
       "      <td>1.840809</td>\n",
       "      <td>2.161053</td>\n",
       "      <td>0.438200</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>24</td>\n",
       "      <td>1.801420</td>\n",
       "      <td>2.027931</td>\n",
       "      <td>0.464200</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>25</td>\n",
       "      <td>1.745192</td>\n",
       "      <td>1.868472</td>\n",
       "      <td>0.500400</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>26</td>\n",
       "      <td>1.633489</td>\n",
       "      <td>1.962110</td>\n",
       "      <td>0.484000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>27</td>\n",
       "      <td>1.627703</td>\n",
       "      <td>1.880883</td>\n",
       "      <td>0.494000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>28</td>\n",
       "      <td>1.614669</td>\n",
       "      <td>1.852295</td>\n",
       "      <td>0.497200</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>29</td>\n",
       "      <td>1.518892</td>\n",
       "      <td>1.757876</td>\n",
       "      <td>0.523600</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>30</td>\n",
       "      <td>1.497662</td>\n",
       "      <td>1.884807</td>\n",
       "      <td>0.498100</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>31</td>\n",
       "      <td>1.483585</td>\n",
       "      <td>1.818728</td>\n",
       "      <td>0.514000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>32</td>\n",
       "      <td>1.461837</td>\n",
       "      <td>1.895038</td>\n",
       "      <td>0.508900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>33</td>\n",
       "      <td>1.426329</td>\n",
       "      <td>1.798380</td>\n",
       "      <td>0.520000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>34</td>\n",
       "      <td>1.388479</td>\n",
       "      <td>1.785028</td>\n",
       "      <td>0.527200</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>35</td>\n",
       "      <td>1.346225</td>\n",
       "      <td>1.866085</td>\n",
       "      <td>0.515400</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>36</td>\n",
       "      <td>1.359317</td>\n",
       "      <td>1.918685</td>\n",
       "      <td>0.500300</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>37</td>\n",
       "      <td>1.320204</td>\n",
       "      <td>1.747932</td>\n",
       "      <td>0.541000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>38</td>\n",
       "      <td>1.272210</td>\n",
       "      <td>1.736186</td>\n",
       "      <td>0.543000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>39</td>\n",
       "      <td>1.255966</td>\n",
       "      <td>1.658791</td>\n",
       "      <td>0.556000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>40</td>\n",
       "      <td>1.246290</td>\n",
       "      <td>1.773252</td>\n",
       "      <td>0.534300</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>41</td>\n",
       "      <td>1.212485</td>\n",
       "      <td>1.820931</td>\n",
       "      <td>0.534600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>42</td>\n",
       "      <td>1.184560</td>\n",
       "      <td>1.684932</td>\n",
       "      <td>0.558900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>43</td>\n",
       "      <td>1.139735</td>\n",
       "      <td>1.683256</td>\n",
       "      <td>0.555500</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>44</td>\n",
       "      <td>1.144600</td>\n",
       "      <td>1.680170</td>\n",
       "      <td>0.559300</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>45</td>\n",
       "      <td>1.120527</td>\n",
       "      <td>1.779878</td>\n",
       "      <td>0.541700</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>46</td>\n",
       "      <td>1.051919</td>\n",
       "      <td>1.603923</td>\n",
       "      <td>0.572800</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>47</td>\n",
       "      <td>1.083255</td>\n",
       "      <td>1.522177</td>\n",
       "      <td>0.589200</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>48</td>\n",
       "      <td>1.060813</td>\n",
       "      <td>1.653011</td>\n",
       "      <td>0.568300</td>\n",
       "      <td>00:34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>49</td>\n",
       "      <td>1.012130</td>\n",
       "      <td>1.654576</td>\n",
       "      <td>0.571100</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>50</td>\n",
       "      <td>1.050767</td>\n",
       "      <td>1.638161</td>\n",
       "      <td>0.585700</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>51</td>\n",
       "      <td>0.982652</td>\n",
       "      <td>1.567328</td>\n",
       "      <td>0.591500</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>52</td>\n",
       "      <td>0.991746</td>\n",
       "      <td>1.628462</td>\n",
       "      <td>0.584600</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>53</td>\n",
       "      <td>0.961419</td>\n",
       "      <td>1.601025</td>\n",
       "      <td>0.581300</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>54</td>\n",
       "      <td>0.945889</td>\n",
       "      <td>1.617615</td>\n",
       "      <td>0.574700</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>55</td>\n",
       "      <td>0.899054</td>\n",
       "      <td>1.563190</td>\n",
       "      <td>0.595300</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>56</td>\n",
       "      <td>0.886868</td>\n",
       "      <td>1.613245</td>\n",
       "      <td>0.587800</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>57</td>\n",
       "      <td>0.904386</td>\n",
       "      <td>1.611906</td>\n",
       "      <td>0.582900</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>58</td>\n",
       "      <td>0.851182</td>\n",
       "      <td>1.579169</td>\n",
       "      <td>0.596000</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>59</td>\n",
       "      <td>0.835665</td>\n",
       "      <td>1.621179</td>\n",
       "      <td>0.594000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>60</td>\n",
       "      <td>0.802861</td>\n",
       "      <td>1.671419</td>\n",
       "      <td>0.578400</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>61</td>\n",
       "      <td>0.812059</td>\n",
       "      <td>1.595067</td>\n",
       "      <td>0.593900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>62</td>\n",
       "      <td>0.821982</td>\n",
       "      <td>1.587756</td>\n",
       "      <td>0.593900</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>63</td>\n",
       "      <td>0.782801</td>\n",
       "      <td>1.622345</td>\n",
       "      <td>0.593400</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>64</td>\n",
       "      <td>0.735014</td>\n",
       "      <td>1.587790</td>\n",
       "      <td>0.598600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>65</td>\n",
       "      <td>0.715437</td>\n",
       "      <td>1.615887</td>\n",
       "      <td>0.595900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>66</td>\n",
       "      <td>0.709943</td>\n",
       "      <td>1.612465</td>\n",
       "      <td>0.597400</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>67</td>\n",
       "      <td>0.693319</td>\n",
       "      <td>1.607344</td>\n",
       "      <td>0.601000</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>68</td>\n",
       "      <td>0.714957</td>\n",
       "      <td>1.613890</td>\n",
       "      <td>0.599900</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>69</td>\n",
       "      <td>0.663490</td>\n",
       "      <td>1.631953</td>\n",
       "      <td>0.600200</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>70</td>\n",
       "      <td>0.650922</td>\n",
       "      <td>1.628782</td>\n",
       "      <td>0.600900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>71</td>\n",
       "      <td>0.683699</td>\n",
       "      <td>1.641360</td>\n",
       "      <td>0.601600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>72</td>\n",
       "      <td>0.619527</td>\n",
       "      <td>1.619169</td>\n",
       "      <td>0.603000</td>\n",
       "      <td>00:30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>73</td>\n",
       "      <td>0.613880</td>\n",
       "      <td>1.622349</td>\n",
       "      <td>0.605600</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>74</td>\n",
       "      <td>0.616373</td>\n",
       "      <td>1.636476</td>\n",
       "      <td>0.603800</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>75</td>\n",
       "      <td>0.591850</td>\n",
       "      <td>1.657393</td>\n",
       "      <td>0.603600</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>76</td>\n",
       "      <td>0.571685</td>\n",
       "      <td>1.630071</td>\n",
       "      <td>0.609700</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>77</td>\n",
       "      <td>0.584634</td>\n",
       "      <td>1.634147</td>\n",
       "      <td>0.605900</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>78</td>\n",
       "      <td>0.544339</td>\n",
       "      <td>1.647362</td>\n",
       "      <td>0.602100</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>79</td>\n",
       "      <td>0.542187</td>\n",
       "      <td>1.655901</td>\n",
       "      <td>0.604600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>80</td>\n",
       "      <td>0.547152</td>\n",
       "      <td>1.643045</td>\n",
       "      <td>0.610100</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>81</td>\n",
       "      <td>0.505922</td>\n",
       "      <td>1.644071</td>\n",
       "      <td>0.606800</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>82</td>\n",
       "      <td>0.506032</td>\n",
       "      <td>1.635483</td>\n",
       "      <td>0.611100</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>83</td>\n",
       "      <td>0.495600</td>\n",
       "      <td>1.640086</td>\n",
       "      <td>0.610800</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>84</td>\n",
       "      <td>0.489882</td>\n",
       "      <td>1.645764</td>\n",
       "      <td>0.610600</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>85</td>\n",
       "      <td>0.466166</td>\n",
       "      <td>1.630407</td>\n",
       "      <td>0.609400</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>86</td>\n",
       "      <td>0.486510</td>\n",
       "      <td>1.643923</td>\n",
       "      <td>0.610700</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>87</td>\n",
       "      <td>0.495449</td>\n",
       "      <td>1.654415</td>\n",
       "      <td>0.609400</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>88</td>\n",
       "      <td>0.447784</td>\n",
       "      <td>1.632904</td>\n",
       "      <td>0.613300</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>89</td>\n",
       "      <td>0.459747</td>\n",
       "      <td>1.647275</td>\n",
       "      <td>0.612100</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>90</td>\n",
       "      <td>0.433692</td>\n",
       "      <td>1.640440</td>\n",
       "      <td>0.612800</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>91</td>\n",
       "      <td>0.432524</td>\n",
       "      <td>1.647991</td>\n",
       "      <td>0.615100</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>92</td>\n",
       "      <td>0.448428</td>\n",
       "      <td>1.645422</td>\n",
       "      <td>0.614700</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>93</td>\n",
       "      <td>0.422625</td>\n",
       "      <td>1.637880</td>\n",
       "      <td>0.613500</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>94</td>\n",
       "      <td>0.432533</td>\n",
       "      <td>1.649730</td>\n",
       "      <td>0.612600</td>\n",
       "      <td>00:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>95</td>\n",
       "      <td>0.418141</td>\n",
       "      <td>1.656644</td>\n",
       "      <td>0.611500</td>\n",
       "      <td>00:34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>96</td>\n",
       "      <td>0.441961</td>\n",
       "      <td>1.657605</td>\n",
       "      <td>0.611600</td>\n",
       "      <td>00:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>97</td>\n",
       "      <td>0.412324</td>\n",
       "      <td>1.639949</td>\n",
       "      <td>0.612800</td>\n",
       "      <td>00:31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table><p>\n",
       "\n",
       "    <div>\n",
       "        <style>\n",
       "            /* Turns off some styling */\n",
       "            progress {\n",
       "                /* gets rid of default border in Firefox and Opera. */\n",
       "                border: none;\n",
       "                /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
       "                background-size: auto;\n",
       "            }\n",
       "            .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
       "                background: #F44336;\n",
       "            }\n",
       "        </style>\n",
       "      <progress value='484' class='' max='781', style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      61.97% [484/781 00:18<00:11 0.4260]\n",
       "    </div>\n",
       "    "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Better model found at epoch 0 with accuracy value: 0.03009999915957451.\n",
      "Better model found at epoch 1 with accuracy value: 0.06949999928474426.\n",
      "Better model found at epoch 2 with accuracy value: 0.1080000028014183.\n",
      "Better model found at epoch 3 with accuracy value: 0.13079999387264252.\n",
      "Better model found at epoch 4 with accuracy value: 0.15119999647140503.\n",
      "Better model found at epoch 5 with accuracy value: 0.17829999327659607.\n",
      "Better model found at epoch 6 with accuracy value: 0.2029000073671341.\n",
      "Better model found at epoch 7 with accuracy value: 0.21889999508857727.\n",
      "Better model found at epoch 8 with accuracy value: 0.22190000116825104.\n",
      "Better model found at epoch 9 with accuracy value: 0.25940001010894775.\n",
      "Better model found at epoch 10 with accuracy value: 0.28949999809265137.\n",
      "Better model found at epoch 11 with accuracy value: 0.30799999833106995.\n",
      "Better model found at epoch 12 with accuracy value: 0.3199999928474426.\n",
      "Better model found at epoch 13 with accuracy value: 0.3237999975681305.\n",
      "Better model found at epoch 14 with accuracy value: 0.3555999994277954.\n",
      "Better model found at epoch 15 with accuracy value: 0.3813000023365021.\n",
      "Better model found at epoch 16 with accuracy value: 0.38420000672340393.\n",
      "Better model found at epoch 17 with accuracy value: 0.40950000286102295.\n",
      "Better model found at epoch 18 with accuracy value: 0.4156000018119812.\n",
      "Better model found at epoch 19 with accuracy value: 0.42260000109672546.\n",
      "Better model found at epoch 20 with accuracy value: 0.42559999227523804.\n",
      "Better model found at epoch 21 with accuracy value: 0.4309000074863434.\n",
      "Better model found at epoch 22 with accuracy value: 0.43309998512268066.\n",
      "Better model found at epoch 23 with accuracy value: 0.4381999969482422.\n",
      "Better model found at epoch 24 with accuracy value: 0.4641999900341034.\n",
      "Better model found at epoch 25 with accuracy value: 0.5004000067710876.\n",
      "Better model found at epoch 29 with accuracy value: 0.5235999822616577.\n",
      "Better model found at epoch 34 with accuracy value: 0.5271999835968018.\n",
      "Better model found at epoch 37 with accuracy value: 0.5410000085830688.\n",
      "Better model found at epoch 38 with accuracy value: 0.5429999828338623.\n",
      "Better model found at epoch 39 with accuracy value: 0.5559999942779541.\n",
      "Better model found at epoch 42 with accuracy value: 0.558899998664856.\n",
      "Better model found at epoch 44 with accuracy value: 0.5593000054359436.\n",
      "Better model found at epoch 46 with accuracy value: 0.5727999806404114.\n",
      "Better model found at epoch 47 with accuracy value: 0.5892000198364258.\n",
      "Better model found at epoch 51 with accuracy value: 0.5914999842643738.\n",
      "Better model found at epoch 55 with accuracy value: 0.595300018787384.\n",
      "Better model found at epoch 58 with accuracy value: 0.5960000157356262.\n",
      "Better model found at epoch 64 with accuracy value: 0.5985999703407288.\n",
      "Better model found at epoch 67 with accuracy value: 0.6010000109672546.\n",
      "Better model found at epoch 71 with accuracy value: 0.6015999913215637.\n",
      "Better model found at epoch 72 with accuracy value: 0.6029999852180481.\n",
      "Better model found at epoch 73 with accuracy value: 0.6055999994277954.\n",
      "Better model found at epoch 76 with accuracy value: 0.6097000241279602.\n",
      "Better model found at epoch 80 with accuracy value: 0.6100999712944031.\n",
      "Better model found at epoch 82 with accuracy value: 0.6111000180244446.\n",
      "Better model found at epoch 88 with accuracy value: 0.6133000254631042.\n",
      "Better model found at epoch 91 with accuracy value: 0.6151000261306763.\n"
     ]
    }
   ],
   "source": [
    "learn.fit_one_cycle(100, max_lr = 1e-3, callbacks=[callbacks.SaveModelCallback(learn, monitor = 'accuracy', mode = 'max')])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "learn.save('resnet26_pretrained_cifar100')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python (ak_fastai)",
   "language": "python",
   "name": "ak_fastai"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
